import request from '@/utils/request'

const base_api = '/admin/system/sysMenu'

//菜单列表接口
export const FindNodes = () => {
  return request({
    url: `${base_api}/findNodes`,
    method: 'get',
  })
}

//角色添加
export const SaveMenu = sysMenu => {
  return request({
    url: `${base_api}/save`,
    method: 'post',
    data: sysMenu,
  })
}

//角色修改
export const UpdateSysMenuById = sysMenu => {
  return request({
    url: `${base_api}/update`,
    method: 'put',
    data: sysMenu,
  })
}

//角色删除
export const RemoveSysMenuById = menuId => {
  return request({
    url: `${base_api}/deleteById/${menuId}`,
    method: 'delete',
  })
}
